<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
</head>
<body>
    <header th:replace="common/IncludeTop"></header>
    <h2>我的订单</h2>

    <table>
        <tr>
            <th>订单ID</th>
            <th>日期</th>
            <th>总价</th>
        </tr>
        <!-- 循环 -->
        <th:forEach var="order" items="${sessionScope.orderList}">
            <tr>
                <td><a href="viewOrder.jsp">${order.orderId}</a></td>
                <td><th:formatDate value="${order.orderDate}"
                                    pattern="yyyy/MM/dd hh:mm:ss" /></td>
                <td><th:formatNumber value="${order.totalPrice}"
                                      pattern="$#,##0.00" /></td>
            </tr>
        </th:forEach>
    </table>
    <footer th:replace="common/IncludeBottom"></footer>
</body>
</html>